import Main from '_c/Main'
import ParentView from '_c/ParentView'

export const routerMap = [
  {
    path: '/',
    name: '_home',
    alias: '/_home/home',
    redirect: '/home',
    component: Main,
    children: [
      {
        path: 'home',
        name: 'home',
        meta: {
          title: '首页',
          icon: 'el-icon-s-platform'
        },
        component: () => import('@/views/Home.vue')
      },
      {
        path: '/about_page',
        name: 'about_page',
        meta: {
          title: '关于',
          icon: 'el-icon-s-help'
        },
        component: ParentView,
        children: [
          {
            path: 'about',
            name: 'about',
            meta: {
              title: '关于',
              icon: 'el-icon-help'
            },
            component: () => import('@/views/About.vue')
          },
          {
            path: 'about_echart',
            name: 'about_echart',
            meta: {
              title: '关于Echart',
              icon: 'el-icon-picture-outline'
            },
            component: () => import('@/views/echart.vue')
          }
        ]
      },
      {
        path: 'echart',
        name: 'echart',
        meta: {
          title: 'EchartBar',
          icon: 'el-icon-picture'
        },
        component: () => import('@/views/echart.vue')
      },
      {
        path: 'table',
        name: 'table',
        meta: {
          title: '表格分页',
          icon: 'el-icon-s-grid'
        },
        component: () => import('@/views/tablePage.vue')
      },
      {
        path: 'tree',
        name: 'tree',
        meta: {
          title: '权限树',
          icon: 'el-icon-s-operation'
        },
        component: () => import('@/views/treeAccess.vue')
      },
      {
        path: 'card',
        name: 'card',
        meta: {
          title: '卡片',
          icon: 'el-icon-price-tag'
        },
        component: () => import('@/views/card.vue')
      },
      {
        path: 'count_to',
        name: 'count_to',
        meta: {
          title: '数字动画',
          icon: 'el-icon-magic-stick'
        },
        component: () => import('@/views/countTo.vue')
      },
      {
        path: 'tinymce',
        name: 'tinymce',
        meta: {
          title: '富文本',
          icon: 'el-icon-share'
        },
        component: () => import('@/views/wangEditor.vue')
      },
      {
        path: 'excel',
        name: 'excel',
        meta: {
          title: 'Excel',
          icon: 'el-icon-s-unfold'
        },
        component: () => import('@/views/excel.vue')
      }
    ]
  }
]

export const routes = [
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/login.vue')
  },
  {
    path: '*',
    component: () => import('@/views/error_404.vue')
  }
]
